GUIVersion = "7.1"
#***************Options*************************************************
TestingType = 4
Options = {"TestResultFolder": "test_res",
           "SaveTestResults": True,
           "CommonLogFileName": "common.log",
           "StatisticsFileName": "statistics.log",
           "ControllingStatus": Normal,
           "ResetTestAfterError": False,
           "PretestReset": True,
           "RSUsePrefix": True,
           "RSUseTargetPartyPrefix": True,
           "WaitACW": False,
           "ACWTimeout": 10,
           "Signal": "9",
           "TestLevel": "2",
           "CreateRegrResultFile": True,
           "ShortRegrResultFile": False,
           "CreateFailedTestsFile": True,
           "TestGetAccessNumber": False,
           "XRouteType": "XRouteTypeDefault",
           "SaveConfigurationChanges": False,
           "PrintConfigDebugInfo": False,
           "TLibLogToFile": False,
           "TServerClientAppName": "QAART",
           "CallMonitoringFeatureOn": False,
           "CallMonitoringCallEventsOnly": True,
           "PrintTestedCMAttributes": False,
           "MSGDPort": 7777,
           "TServerReconnectAttempts": 50,
           "MSGDHost": "localhost",
           "MistHost": "localhost",
           "MistPort": 0,
           "TrackEvents": False,
           "ViewFileName": "test_view.log",
           "AddpLogFileName": "addp.log",
           "SiebelURL": "",
           "SiebelClientClass": "SiebelAgent75.SiebelAgentAsync",
           "UseThinClient": False,
           "TBSCKillTimeout": 5,
           "TBSCStartTimeout": 5,
           "AddpTest": False,
           "AdapterTestLevel": 2,
           "UseSip": False,
           "SipPort": 5060,
           "KServerHostFull": "machine@genesyslab.com"}
#*********ConfigServer parameters***************************************
CSHost = "west"
CSPort = "7275"
CSApplication = "default"
CSUserName = "default"
CSPassword = "password"
CSBackupHost = ""
CSBackupPort = ""
ConfigServerName = "ConfigServer"

def InitConfigServerObjects():
  global CfgConfigServer
  CfgConfigServer = CfgApplication(name = "confserv")
  global CfgLocalTserver
  CfgLocalTserver = CfgApplication(name = "TS_SIP_7.5.000.29_kangaroo")
  global CfgCPDServer1
  CfgCPDServer1 = CfgApplication(name = "CPDServer_750.20_tommy")

def InitAppsUnderTheTest():
  ApplicationUnderTheTest("ConfigServer", "ConfigServer", CfgConfigServer, None, None, None, r"", 0)
  ApplicationUnderTheTest("LocalTserver", "TServer", CfgLocalTserver, None, None, None, r"", 0, subType = "SIP", accessNumber = "", ignoreAttributes = "")
  ApplicationUnderTheTest("CPDServer1", "CPDServer", CfgCPDServer1, None, None, None, r"", 0)
  ApplicationUnderTheTest("Tserver1", "VirtualTserver", None, None, None, None, r"", 0)

def LocalTserverPreTestReset():
  dnNumbers = ()
  posNumbers = ("2001", "2003", "2002", "2004", "2005",)
  posNumbers = ()
  posQueueConnection = (("2001", "9999"), ("2002", "9999"), ("2003", "9999"), ("2004", "9999"), ("2005", "9999"),)
  posQueueConnection = ()
  LocalTserver.Reset(dnNumbers, posNumbers, posQueueConnection)

def InitLocalTserverObjects():
  global ACD1
  ACD1 = LocalTserver.Queue(number = "9999", numberForLogin = "9999", numberForCall = "", numberForExtCall = "", register = "Default", tserver = LocalTserver)
  ACD1.globalName = "ACD1"
  #global PosID1
  #PosID1 = LocalTserver.Position(number = "2001", numberForCall = "2000", numberForExtCall = "", register = "Default", tserver = LocalTserver)
  #PosID1.globalName = "PosID1"
  #
  #global PosID2
  #PosID2 = LocalTserver.Position(number = "2002", numberForCall = "2000", numberForExtCall = "", register = "Default", tserver = LocalTserver)
  #PosID2.globalName = "PosID2"  
  #
  #global PosID3
  #PosID3 = LocalTserver.Position(number = "2003", numberForCall = "2000", numberForExtCall = "", register = "Default", tserver = LocalTserver)
  #PosID3.globalName = "PosID3" 
  #
  #global PosID4
  #PosID4 = LocalTserver.Position(number = "2004", numberForCall = "2000", numberForExtCall = "", register = "Default", tserver = LocalTserver)
  #PosID4.globalName = "PosID4"  
  #
  #global PosID5
  #PosID5 = LocalTserver.Position(number = "2005", numberForCall = "2000", numberForExtCall = "", register = "Default", tserver = LocalTserver)
  #PosID5.globalName = "PosID5"  
  #
  #global Ag1
  #Ag1 = LocalTserver.Agent(id = "2001", autoAnswer = 1, stateAfterCall = "None", defaultQueue = ACD1, defaultDN = PosID1, defaultPassword = "")
  #Ag1.globalName = "Ag1"
  #Ag1.Login(ACD1, PosID1, "")
  #if Ag1.state != AgentState.Ready:
  #  Ag1.SetReady(ACD1)
  #Ag1.SaveState("Login-Ready")
  #global Ag2
  #Ag2 = LocalTserver.Agent(id = "2002", autoAnswer = 1, stateAfterCall = "None", defaultQueue = ACD1, defaultDN = PosID1, defaultPassword = "")
  #Ag2.globalName = "Ag2"
  #Ag2.Login(ACD1, PosID2, "")
  #if Ag2.state != AgentState.Ready:
  #  Ag2.SetReady(ACD1)
  #Ag2.SaveState("Login-Ready")
  #global Ag3
  #Ag3 = LocalTserver.Agent(id = "2003", autoAnswer = 1, stateAfterCall = "None", defaultQueue = ACD1, defaultDN = PosID1, defaultPassword = "")
  #Ag3.globalName = "Ag3"
  #Ag3.Login(ACD1, PosID3, "")
  #if Ag3.state != AgentState.Ready:
  #  Ag3.SetReady(ACD1)
  #Ag3.SaveState("Login-Ready")
  #global Ag4
  #Ag4 = LocalTserver.Agent(id = "2004", autoAnswer = 1, stateAfterCall = "None", defaultQueue = ACD1, defaultDN = PosID1, defaultPassword = "")
  #Ag4.globalName = "Ag4"
  #Ag4.Login(ACD1, PosID4, "")
  #if Ag4.state != AgentState.Ready:
  #  Ag4.SetReady(ACD1)
  #Ag4.SaveState("Login-Ready")
  #global Ag5
  #Ag5 = LocalTserver.Agent(id = "2005", autoAnswer = 1, stateAfterCall = "None", defaultQueue = ACD1, defaultDN = PosID1, defaultPassword = "")
  #Ag5.globalName = "Ag5"
  #Ag5.Login(ACD1, PosID5, "")
  #if Ag5.state != AgentState.Ready:
  #  Ag5.SetReady(ACD1)
  #Ag5.SaveState("Login-Ready")    

  


def InitCPDServer1Objects():
  global CPD1
  CPD1 = CPDObject( cpdServer = CPDServer1)
  CPD1.globalName = "CPD1"

def InitTserver1Objects():
  #global ExtDNNoAnswer
  #ExtDNNoAnswer = Tserver1.DN(number = "98476145", answerType = "NoAnswer", tserver = Tserver1)
  #ExtDNNoAnswer.globalName = "ExtDNNoAnswer"
  #global ExtDNVoice
  #ExtDNVoice = Tserver1.DN(number = "96586930", answerType = "Voice", tserver = Tserver1)
  #ExtDNVoice.globalName = "ExtDNVoice"
  #global ExtDNBusy
  #ExtDNBusy = Tserver1.DN(number = "96586947", answerType = "Busy", tserver = Tserver1)
  #ExtDNBusy.globalName = "ExtDNBusy"  
  #global ExtDNFax
  #ExtDNFax = Tserver1.DN(number = "96586933", answerType = "Fax", tserver = Tserver1)
  #ExtDNFax.globalName = "ExtDNFax"    
  #global ExtDNAM
  #ExtDNAM = Tserver1.DN(number = "96586931", answerType = "AnsweringMachine", tserver = Tserver1)
  #ExtDNAM.globalName = "ExtDNAM"    
  #global ExtDNSIT
  #ExtDNSIT = Tserver1.DN(number = "96586935", answerType = "Sit", tserver = Tserver1)
  #ExtDNSIT.globalName = "ExtDNSIT"    
  
  #VTO numbers
  
  global ExtDNNoAnswer
  ExtDNNoAnswer = Tserver1.DN(number = "96586934", answerType = "NoAnswer", tserver = Tserver1)
  ExtDNNoAnswer.globalName = "ExtDNNoAnswer"
  global ExtDNVoice
  ExtDNVoice = Tserver1.DN(number = "96586930", answerType = "Voice", tserver = Tserver1)
  ExtDNVoice.globalName = "ExtDNVoice"
  global ExtDNBusy
  ExtDNBusy = Tserver1.DN(number = "96586932", answerType = "Busy", tserver = Tserver1)
  ExtDNBusy.globalName = "ExtDNBusy"  
  global ExtDNFax
  ExtDNFax = Tserver1.DN(number = "96586933", answerType = "Fax", tserver = Tserver1)
  ExtDNFax.globalName = "ExtDNFax"    
  global ExtDNAM
  ExtDNAM = Tserver1.DN(number = "96586931", answerType = "AnsweringMachine", tserver = Tserver1)
  ExtDNAM.globalName = "ExtDNAM"    
  global ExtDNSIT
  ExtDNSIT = Tserver1.DN(number = "96586935", answerType = "Sit", tserver = Tserver1)
  ExtDNSIT.globalName = "ExtDNSIT"    
  


def InitCommonObjects():
  pass

